// PartManager.h: interface for the PartManager class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_PARTMANAGER_H__73890291_D78B_4EB5_87A7_A89AC7A1C054__INCLUDED_)
#define AFX_PARTMANAGER_H__73890291_D78B_4EB5_87A7_A89AC7A1C054__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "ManagerTemplate.h"
#include "ProjectSubObject.h"
#include "UeObjectId.h"

Part* Convert(Part* p, const ObjectId& id);

INLINE BOOL TypeCast(const UeObjectId& i, Part*& o)
{
	o = Convert(o, i);
	return TRUE;
}

class Part;
class DllExport PartManager : 
public ReferenceManager<UeObjectId, UeObjectId, Part*>  , public ProjectSubObject
{
public:
	PartManager();
	virtual ~PartManager();

public:
	Part* GetPart(INT nKey);
	void AddPart(Part* pPart);

};

#endif // !defined(AFX_PARTMANAGER_H__73890291_D78B_4EB5_87A7_A89AC7A1C054__INCLUDED_)
